import Vue from 'vue'
import Router from 'vue-router'
import People from '@/components/People'
import Land from '@/components/Land'
import Good from '@/components/Good'
import axios from 'axios'
import apiConfig from '../../config/api.config.js'
axios.defaults.baseURL=apiConfig.baseURL
import VueAxios from 'vue-axios'



Vue.use(Router)
Vue.use(VueAxios, axios)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'People',
      component: People
    },
	{
	  path: '/land',
	  name: 'land',
	  component: Land
	},
	{
	  path: '/good',
	  name: 'good',
	  component: Good
	}
  ],
  mode: 'history', 
   // 加了base配置，在所有的路由path前面url会添加一个base，像这样http://localhost:8000/base/app
      // base: '/base/',
	  //配置滚动记录
	  //     scrollBehavior (to, from, savedPosition) {
	  //       if (savedPosition) {
	  //         return savedPosition
	  //       } else {
	  //         return { x: 0, y: 0 }
	  //       }
	  
	  //     }
})
